program pi;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var No,N:integer;
 i:longint;
 fout:text;
 x,y:real;
begin
  randomize;
  N:=0;
  No:=0;
  assign(fout,'out.txt');
  rewrite(fout);
  for i:=1 to 1500000000 do
  begin
    x:=2*random;
    y:=2*random;
    if ((x-1)*(x-1)+(y-1)*(y-1)<=1) then
      No:=No+1;
    N:=N+1;
    if((i mod 30000)=0) then
      writeln (fout,4.0*No/N);
    if(i mod 500000=0) then writeln(i div 500000);
  end;
  close( fout);
end.
